AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )

include('shared.lua')

function ENT:StartTouchPlayersNPCs(e)

	if(self.Attached[e]) then return end; -- Attached props
	if(self.ShuttingDown and not self.ShuttingDownKill) then return; end
	if(not IsValid(e)) then return end; -- Not valid
	if(e:IsPlayer() and (IsValid(e:GetParent()) or IsValid(e:GetVehicle()) or IsValid(e:GetNetworkedEntity("ScriptedVehicle", NULL)))) then return end; -- No teleport/kill of parented players
	if(e.NotTeleportable) then return end; -- Does not want to be teleported!
	local class = e:GetClass();
	if(class:find("stargate")) then return end;
	local parent = self.Entity:GetParent();
	
	
	
	if(e:IsPlayer() == true) then
	
		e:ConCommand( "connect " .. self.Entity:GetParent().RemoteIp  )
		
	end
	
end

